<?php
/**
 * Created by PhpStorm.
 * User: liuchaozhong
 * Date: 2018/8/27
 * Time: 下午6:46
 */
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ShareCheckIn extends Model
{
    protected $table = 'share_checkin_log';
    public $timestamps = false;
    public $fillable = ['member_id','content','date'];

    /**
     * 添加分享签到记录
     * @param $member_id 用户id
     * @param $content  分享签到内容
     */
    public function addShareCheck($member_id, $content)
    {
        $today = date('Y-m-d');
        $insert = [
            'member_id' => $member_id,
            'content' => $content,
            'date' =>$today
        ];
        $res = ShareCheckIn::create($insert);

        return $res ? $res : false;
    }

}